package ClientUI;

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import javax.swing.WindowConstants;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextArea;

import Protocol.threadStatus.ThreadStatus;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class ThreadPanel extends javax.swing.JPanel {
	private JLabel authorLabel;
	private JTextArea threadArea;
	private JButton commentButton;

	private ThreadStatus	thread;
	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.
	*/
	/*public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new ThreadPanel());
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}*/
	
	public ThreadPanel() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setPreferredSize(new Dimension(400, 300));
			this.setLayout(null);
			{
				authorLabel = new JLabel();
				this.add(authorLabel);
				authorLabel.setText("author");
				//authorLabel.setText(this.thread.getAuthor_id());
				authorLabel.setBounds(12, 21, 38, 17);
			}
			{
				threadArea = new JTextArea();
				this.add(threadArea);
				threadArea.setText("threa");
				threadArea.setText(this.thread.getContent());
				threadArea.setBounds(68, 29, 226, 71);
			}
			{
				commentButton = new JButton();
				this.add(commentButton);
				commentButton.setText("Post");
				commentButton.setBounds(322, 29, 70, 24);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	private void addMyListeners() {
		this.commentButton.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO Auto-generated method stub
				
			}
			
		});
	}

}
